<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<form id="pagerForm" method="post" action="${ctx }/crm/visit.action">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum"  value="${page.pageNo}" />
	<input type="hidden" name="numPerPage" id="numPerPage" value="${page.pageSize}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="selectedId" id="selectedId" value="" />
	
	<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
	<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
	<input type="hidden" name="page.order" id="order" value="${page.order}"/>
	<input type="hidden" name="page.pageSize" id="pageSize" value="${page.pageSize}"/>
</form>

<div class="page">
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" action="${ctx }/crm/visit.action" method="post">
		<div class="searchBar">
			<ul class="searchContent">
					<li>
					<label>客户姓名：</label>
					<input type="text" name="filter_LIKES_customername" value="${param['filter_LIKES_customername']}"/>
				</li>
				<li>
					<label>拜访时间：</label>
					<input type="text" name="filter_GED_occurdate" id="filter_GED_occurdate" value="${param['filter_GED_occurdate']}" size="8" onfocus="WdatePicker({el:'filter_GED_occurdate',dateFmt:'yyyy-MM-dd'})"/>
					至
					<input type="text" name="filter_LED_occurdate" id="filter_LED_occurdate" value="${param['filter_LED_occurdate']}" size="8" onfocus="WdatePicker({el:'filter_LED_occurdate',dateFmt:'yyyy-MM-dd'})"/>
				</li>
				<li>
					<label>拜访主题：</label>
					<input type="text" name="filter_LIKES_subject" value="${param['filter_LIKES_subject']}"/>
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit"> 检 索 </button></div></div></li>
				</ul>
			</div>
		</div>
		</form>
	</div>
	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="${ctx }/crm/visit!input.action" target="navTab" title="添加拜访信息"><span>添加</span></a></li>
				<li><a class="delete" href="${ctx}/crm/visit!delete.action?id={visitId}" target="navTabTodo" title="确定要删除吗?"><span>删除</span></a></li>
				<li><a class="edit" href="${ctx}/crm/visit!input.action?id={visitId}" target="navTab" title="修改拜访信息"><span>修改</span></a></li>
				<li class="line">line</li>
				<li><a class="icon" href="#"><span>导入EXCEL</span></a></li>
			</ul>
		</div>
			<table class="table" layouth="142">
			<thead>
				<tr>
					<th style="width:80px;">客户姓名</th>
					<th style="width:80px;">拜访时间</th>
					<th style="width:80px;">拜访类型</th>
					<th style="width:180px;">拜访主题 </th>
					<th style="width:180px;">拜访结果</th>
					<th style="width:80px;">下次拜访时间</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="page.result">
					<tr target="visitId" rel="${id}">
						<td>${customername}</td>
						<td><s:date name="occurdate" format="yyyy-MM-dd HH:mm"></s:date></td>
						<td>${visittype.name}</td>
						<td>${subject}</td>
						<td>${result}</td>
						<td>
						<s:if test="nextdate!=null">
						<s:date name="nextdate" format="yyyy-MM-dd HH:mm"></s:date>
						</s:if>
						</td>
					</tr>
		</s:iterator>	
			</tbody>
		</table>
		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select name="numPerPage" id="showNumPerPage" onchange="$('#pageSize').val($(this).val());navTabPageBreak({numPerPage:this.value})">
					<option value="14">14</option>
					<option value="20">20</option>
					<option value="50">50</option>
					<option value="100">100</option>
				</select>
				<span>条，共${page.totalCount}条</span>
			</div>
			
			<div class="pagination" targetType="navTab" totalCount="${page.totalCount}" numPerPage="${page.pageSize}" pageNumShown="10" currentPage="${page.pageNo}"></div>

		</div>
	</div>
</div>